package com.itcast.demo_one.kotlin

const val PI = 3.14
fun main(){
    // 1.定义常量
    /*val name = "张三"
    val age = 18
    println(name + age)*/

    // 2.定义变量
    /*var age = 18
    age = 19
    println(age)*/

    /*var num1 = 10
    var num2 = 20
    val sum =num1 + num2
    println(sum)*/

    // 3.类型推导
    /*var age:Int = 20
    var name: String = "张三"
    var grade:Char = 'B'*/

    // 4.字符串拼接
    var name = "张三"
    var age = 18
    println("我的名字是：$name,年龄是: ${age+5}")
}